package com.cmcc.qx.util;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 日期时间工具类
 * 
 * @author zhangxiaobo
 */
public class DateUtil {

	private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
	
	/**
	 * 得到当前时间戳对象
	 * 
	 * @return
	 */
	public static Timestamp getTimestamp() {
		return getTimestamp(new Date());
	}

	/**
	 * 得到Date对应的时间戳对象
	 * 
	 * @param date
	 * @return
	 */
	public static Timestamp getTimestamp(Date date) {
		return new Timestamp(date.getTime());
	}

}
